//
// Created by ✎﹏ℳ๓独赏 ☆独醉 on 2023/2/25.
//
#include <stdio.h>
#include <stdlib.h>

int main(){
    /*
     * 0000 0000 0000 0000
     *
     *
     * 1111 1111 1111 1111 --- 补码
     * 1111 1111 1111 1110 --- 反码
     * 1000 0000 0000 0001 --- 原码
     */
    short a = 0;
    a = ~a;
    printf("%d\n",a);
    short b = a;
    printf("%d\n",b);

    /*
     * 1000 0000 0000 0010
     * 1111 1111 1111 1101
     * 1111 1111 1111 1110
     */
    b = -2;
    printf("%d\n",b);
    return 0;
}